/*
 * DataOutputStreamX.java
 *
 * Created on 16 de enero de 2008, 02:32 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pe.com.nextel.rms;

import java.io.IOException;
import java.io.OutputStream;
import java.io.DataOutputStream;

/**
 *
 * @author ibonilla
 */
public class DataOutputStreamX extends DataOutputStream{
    
    /** Creates a new instance of DataOutputStreamX */
    public DataOutputStreamX(OutputStream os) {
        super(os);
    }
     
    public void writeString(String str) throws IOException{
        writeInt(str.length());
        writeChars(str);
         
    }
    
    //aMendiola 21/10/2010
    public void writeStringShort(String str) throws IOException {
        writeShort(str.length());
        writeChars(str);              
    }
    
    //aMendiola 21/10/2010
    public void writeStringByte(String str) throws IOException {
        writeByte(str.length());
        writeChars(str);                 
    }            
    
}
